POST method help

by: tonyphoang, 9 years ago


Using the code from from of my *-action.html works for standard text input

<form method="POST" action="{{ url_for('controlaction') }}">  
<label for="control_input_arg1">Enter first argument:</label><br>
<input type="text" name="control_input_arg1" /><br />
<input type="submit" value='Submit Perimeters!'>


But when I try to make it into a pulldown, it doesn't work gives me a 400 error. Any clue what's going on?


                <form method="POST" action="{{ url_for('controlaction') }}">        
                  <select names="control_input_arg1">
                    <option value="" disabled="disabled"  style="display:none" selected="selected">Please select a year</option>
                    <option value="2015">2015</option>
                    <option value="2016">2016</option>
                    <option value="2017">2017</option>
                    <option value="2018">2018</option>
                    <option value="2019">2019</option>
                    <option value="2020">2020</option>
                  </select>

                  <input type="submit" value='Submit Perimeters!'>




You must be logged in to post. Please login or register an account.



Jesus it's been a long day of coding


                <select names="control_input_arg1">



                <select name="control_input_arg1">


-tonyphoang 9 years ago

You must be logged in to post. Please login or register an account.

A 400 is a bad request.

Are you ever closing the form? I don't see it closed off in your code.

-Harrison 9 years ago

You must be logged in to post. Please login or register an account.

Thanks, it turned out to be that.

-tonyphoang 9 years ago

You must be logged in to post. Please login or register an account.